<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <h1>打个招呼：</h1>
        <hello></hello>
        <hello></hello>
        <hello></hello>
    </div>
</body>
<script src="node_modules/vue/dist/vue.js"></script>
<script>
    Vue.component("hello", {
        template: `
            <div>
                <input type="button" value="点我呀" @click="num++">
                <h1>大家好，我叫{{name}}, 有{{num}}位妹子迷恋我</h1>
            </div>
        `,
        data(){
            return {
                name: "余栋",
                num: 0
            }
        }
    });
    const vue = new Vue({
        el: "#app",
        data: {

        }
    })
</script>
</html>